html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

a{
  text-decoration: underline;
  color: #ab0286;
}

body {
  background-image: url("https://res.cloudinary.com/dbpmxkrgz/image/upload/v1684777402/Sanaa%27s%20World/pink_clouds_darker_tv5irt.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-attachment: scroll;
  color: #f6eec2;
  font-family: Garamond, serif;
  position: relative;
}

.page-wrap {
  position: relative;
  min-height: 100vh;
  padding-bottom: 6rem;
}

.content-panel {
  display: block;
  width: min(80%, 900px);
  max-width: calc(100% - 2rem);
  background: rgba(77, 119, 196, 0.475);
  padding: 1.2rem 1.5rem;
  margin: 2rem 1.25rem 0;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

#pagetitle {
  text-align: left;
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.5rem, 2vw + 1rem, 2.6rem);
  margin-top: 50px;
  margin-left: 20px;
}

#subtitle {
  text-align: left;
  font-weight: normal;
  text-decoration: underline;
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.05rem, 1.2vw + 0.8rem, 1.6rem);
  margin-top: 10px;
  margin-left: 20px;
}

#maintext {
  text-align: left;
  max-width: min(70ch, 100%);
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1rem, 0.8vw + 0.85rem, 1.2rem);
  line-height: 1.5;
  margin-top: 20px;
  margin-left: 20px;
}

#link {
    text-align: left;
    max-width: min(70ch, 100%);
    font-family: 'Times New Roman', Times, serif;
    font-size: clamp(0.95rem, 0.7vw + 0.8rem, 1.1rem);
    margin-left: 20px;
    margin-bottom: 20px;
}

.interest-form {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(72, 117, 202, 0.937);
  padding: 0.9rem;
  border-radius: 8px;
  z-index: 3;
}

.interest-form label {
  color: #f6eec2;
  font-family: Garamond, serif;
  font-size: 1rem;
}

.interest-form input {
  padding: 0.5rem;
  border: 1px solid #f6eec2;
  border-radius: 4px;
}

.interest-form button {
  padding: 0.5rem;
  border: none;
  border-radius: 4px;
  background: #f6eec2;
  color: #081830;
  cursor: pointer;
}

.guestlist-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  padding: 0.6rem 0.9rem;
  border: none;
  border-radius: 6px;
  background: rgba(77, 119, 196, 0.95);
  color: #f6eec2;
  font-family: Garamond, serif;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.guestlist-panel {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 6;
  width: min(24rem, calc(100vw - 2rem));
  max-height: min(70vh, 32rem);
  padding: 1rem 1rem 1.2rem;
  border-radius: 8px;
  background: rgba(77, 119, 196, 0.95);
  color: #f6eec2;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  display: none;
  overflow: auto;
}

.guestlist-panel.open {
  display: block;
}

.guestlist-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  border: none;
  background: transparent;
  color: #f6eec2;
  font-size: 1.4rem;
  cursor: pointer;
}

.guestlist-panel h3 {
  margin: 0 0 0.8rem;
  font-family: Garamond, serif;
  font-size: 1.2rem;
}

.guestlist-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.guestlist-item,
.guestlist-empty {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid rgba(246, 238, 194, 0.25);
  font-family: Garamond, serif;
  font-size: 1rem;
}

.floating-names {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.floating-name {
  --start-offset: 8vw;
  --wobble-a: 0px;
  --wobble-b: 0px;
  --wobble-c: 0px;
  --wobble-d: 0px;
  position: absolute;
  left: calc(100% + var(--start-offset));
  color: rgba(246, 238, 194, 0.8);
  font-family: Garamond, serif;
  font-size: calc(19px + 1.5vh);
  white-space: nowrap;
  opacity: 0.75;
  text-shadow: 0 0 8px rgba(255,255,255,0.2);
  animation-name: drift;
  animation-duration: 24s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-delay: 0.2s;
}

.floating-name.active {
  animation-play-state: running;
}

@keyframes drift {
  0% {
    transform: translateX(0) translateY(0);
    filter: blur(2px);
  }
  10% {
    transform: translateX(-10vw) translateY(var(--wobble-a));
    filter: blur(2px);
  }
  24% {
    transform: translateX(-24vw) translateY(var(--wobble-b));
    filter: blur(2px);
  }
  42% {
    transform: translateX(-42vw) translateY(var(--wobble-c));
    filter: blur(2px);
  }
  60% {
    transform: translateX(-60vw) translateY(var(--wobble-d));
    filter: blur(2px);
  }
  80% {
    transform: translateX(-80vw) translateY(calc(var(--wobble-a) * 0.5));
    filter: blur(2px);
  }
  100% {
    transform: translateX(-140vw) translateY(0);
    filter: blur(2px);
  }
}

@media only screen and (max-width: 768px) {
  body {
    background-position: center top;
  }

  .page-wrap {
    padding-bottom: 8rem;
  }

  .content-panel {
    width: calc(100% - 1.5rem);
    margin: 1rem auto 0;
    padding: 1rem;
  }

  #pagetitle,
  #subtitle,
  #maintext,
  #link {
    margin-left: 0;
    margin-right: 0;
  }

  #pagetitle {
    margin-top: 1rem;
  }

  #maintext {
    max-width: 100%;
  }

  .interest-form {
    right: 0.75rem;
    left: 0.75rem;
    bottom: 0.75rem;
    width: auto;
  }

  .guestlist-panel {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
}